<?php

/**
 * Licencia form base class.
 *
 * @package    isaac
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 12815 2008-11-09 10:43:58Z fabien $
 */
class BaseLicenciaForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'observacion' => new sfWidgetFormInput(),
      'desde'       => new sfWidgetFormDate(),
      'hasta'       => new sfWidgetFormDate(),
      'tipo'        => new sfWidgetFormInput(),
      'personal_id' => new sfWidgetFormPropelChoice(array('model' => 'Personal', 'add_empty' => true)),
      'created_at'  => new sfWidgetFormDateTime(),
      'updated_at'  => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorPropelChoice(array('model' => 'Licencia', 'column' => 'id', 'required' => false)),
      'observacion' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'desde'       => new sfValidatorDate(array('required' => false)),
      'hasta'       => new sfValidatorDate(array('required' => false)),
      'tipo'        => new sfValidatorInteger(array('required' => false)),
      'personal_id' => new sfValidatorPropelChoice(array('model' => 'Personal', 'column' => 'id', 'required' => false)),
      'created_at'  => new sfValidatorDateTime(array('required' => false)),
      'updated_at'  => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('licencia[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Licencia';
  }


}
